import request from '@/utils/request'

export function getRentList(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.RentList',
    method: 'post',
    data,
  })
}

export function getBookList(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.BookList',
    method: 'post',
    data,
  })
}

export function addRent(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.AddRent',
    method: 'post',
    data,
  })
}

export function rentDetail(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.RentDetail',
    method: 'post',
    data,
  })
}

export function editOneRent(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.ModifyRentInfo',
    method: 'post',
    data,
  })
}

export function editRent(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.UpdateRent',
    method: 'post',
    data,
  })
}

export function deleteRent(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.DeleteRent',
    method: 'post',
    data,
  })
}

export function addCustomer(data) {
  return request({
    url: '/admin.php?s=Admin.RentCustomer.AddCustomer',
    method: 'post',
    data,
  })
}

export function editCustomer(data) {
  return request({
    url: '/admin.php?s=Admin.RentCustomer.UpdateCustomer',
    method: 'post',
    data,
  })
}

export function deleteCustomer(data) {
  return request({
    url: '/admin.php?s=Admin.RentCustomer.DeleteCustomer',
    method: 'post',
    data,
  })
}

export function cancelRent(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.CancelRent',
    method: 'post',
    data,
  })
}

export function editRentDate(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.ExtensionRentDate',
    method: 'post',
    data,
  })
}

export function deleteBook(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.CancelBookRent',
    method: 'post',
    data,
  })
}

export function addBook(data) {
  return request({
    url: '/admin.php?s=Admin.Rent.BookRent',
    method: 'post',
    data,
  })
}
